﻿using DotNetCore.MyBlogApi.Data.Attributes;
using DotNetCore.MyBlogApi.Data.Models.m2m_middle;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace DotNetCore.MyBlogApi.Data.Models
{
    [DBDescription("文章Tag")]
    public class ArticleTag
    {
        [Key]
        public Guid TagId { get; set; }

        public string TagName { get; set; }

        [Timestamp]
        public byte[] Vsersion { get; set; }//版本标识

        [DBDescription("是否删除")]
        public bool IsDelete { get; set; }

        //导航属性
        public Guid SysUserId { get; set; }
        public SysUser SysUser { get; set; }//所属用户

        public ICollection<Article_ArticleTag> Article_ArticleTags { get; set; }//文章表桥 多对多关系

        /// <summary>
        /// 构造函数
        /// </summary>
        public ArticleTag()
        {
            Article_ArticleTags = new List<Article_ArticleTag>();
            IsDelete = false;
        }
    }
}
